<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="javascript">
function getexpress()
{
	$.post("/order/ajaxbutton", {"op": "getupsexpress","ckey":"upsexpressset"},
	  function(data){
		  if(data){
		  	$("#comname").val(data.comname);
			$("#attentionname").val(data.attentionname);
			$("#shippernumber").val(data.shippernumber);
			$("#phonenumber").val(data.phonenumber);
			$("#address").val(data.address);
			$("#city").val(data.city);
			$("#postcode").val(data.postcode);
			$("#countrycode").val(data.countrycode);
			$("#password").val(data.password);
			$("#accesskey").val(data.accesskey);
			$("#suppliersearch").val(data.suppliersearch);
			$("#upsurl1").val(data.upsurl1);
			$("#upsurl2").val(data.upsurl2);
			$('#showgetexpress').modal('show');


		  }
	   },"json");
	$('#showgetexpress').modal('show');
}
function atmangban()
{
	var comname = $("#comname").val();
	if(comname=="")
	{
		alert("请输入公司名称！");
		return;
	}
	var attentionname = $("#attentionname").val();
	var shippernumber = $("#shippernumber").val();
	var phonenumber = $("#phonenumber").val();
	var address = $("#address").val();
	var city = $("#city").val();
	var postcode = $("#postcode").val();
	var countrycode = $("#countrycode").val();
	var password = $("#password").val();
	var accesskey = $("#accesskey").val();
	var suppliersearch = $("#suppliersearch").val();
	var upsurl1 = $("#upsurl1").val();
	var upsurl2 = $("#upsurl2").val();
	$.post("/order/ajaxbutton", {"op": "saveupsexpress","comname":comname,"attentionname":attentionname,"shippernumber":shippernumber,"phonenumber":phonenumber,"address":address,"city":city,"postcode":postcode,"countrycode":countrycode,"password":password,"accesskey":accesskey,"upsurl1":upsurl1,"upsurl2":upsurl2},
	  function(data){
			if(data)
			{
				$("#upsexpressset").val('');
				$("#upsexpressset").val(data);
				$('#showgetexpress').modal('hide');
			}
	   },"text");
}

//燕文交运设置
function getExpressConf(conf_key,type,title='DHL')
{
	$("#shipment_titlename").html(title+"交运设置");
	$("#shipment_type").val(type);
    $.post("/expressshipment/ajaxbutton", {"op": "getExpressConf","ckey":conf_key},function(data){
		if(data){
			$("#shipment_userid").val(data.user_id);
			$("#shipment_pass").val(data.pass);
			$("#shipment_apiurl").val(data.api_url);
			$('#shipmentMemberSet').modal('show');
		}
	},"json");
    $('#shipmentMemberSet').modal('show');
}
function submitShipmentConf(){
	var express_type=$("#shipment_type").val();
    var userid = $("#shipment_userid").val();
    if(userid==""){
        alert("请输入客户帐号！");
        return;
    }
    var pass = $("#shipment_pass").val();
    var apiurl = $("#shipment_apiurl").val();
    $.post("/expressshipment/ajaxbutton", {"op": "setExpressConf",
	"user_id":userid,"pass":pass,"api_url":apiurl},
    function(data){
		if(data){
			$("#shipment_conf_"+express_type).val(data.searialize);
		}
    },"json");
	$('#shipmentMemberSet').modal('hide');
}
</script>
<title>订单相关设置</title>
<body class="withvernav">
<div class="bodywrapper">
{{include file='/public/leftmenu.tpl'}}
<div class="centercontent tables">
  <div class="pageheader notab">
    <h1 class="pagetitle">订单相关设置</h1>
   </div>
  <!--pageheader-->
  <form class="stdform stdform2" method="post" action="/oversea/saveconfig">
    <div id="contentwrapper" class="contentwrapper">
     
      <div class="contenttitle2">
        <h3>交运设置</h3>
      </div>
      <!--contenttitle-->
      <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
        <colgroup>
        <col class="con0" />
        <col class="con1" />
        </colgroup>
        <thead>
          <tr>
            <th class="head0 tdcss">名称</th>
            <th class="head1">参数</th>
          </tr>
        </thead>
        <tbody>
        	
        	<tr>
             <td>历史订单显示最新的</td>
             <td><input  value="{{$rsdb.confighistoryordernum}}" id="confighistoryordernum" name="webdbs[confighistoryordernum]"  type="text"  class="dfinput" />条</td>
           </tr>
           <tr>
             <td>订单日志显示最新的</td>
             <td><input  value="{{$rsdb.configlognum}}" id="configlognum" name="webdbs[configlognum]"  type="text"  class="dfinput" />条</td>
           </tr>
           <tr>
            <td>UPS 交运设置</td>
            <td>
            <textarea name="webdbs[upsexpressset]" id="upsexpressset" readonly cols="8" rows="4">{{$rsdb.upsexpressset}}</textarea>
            <br>
            <a href="javascript:void(0)" onClick="getexpress()"><font color="#003399">点击设置</font></a>
              </td>
          </tr>
            <tr>
                <td>DHL交运设置</td>
          <td>
                    <textarea name="webdbs[shipment_conf_dhl]" id="shipment_conf_dhl" readonly cols="8" rows="4">{{$rsdb.shipment_conf_dhl}}</textarea>
                    <br>
                    <a href="javascript:void(0)" onClick="getExpressConf('shipment_conf_dhl','dhl','DHL')"><font color="#003399">点击设置</font></a>
                </td>
            </tr>
            <tr>
                <td>CNE交运设置</td>
                <td>
                    <textarea name="webdbs[shipment_conf_cne]" id="shipment_conf_cne" readonly cols="8" rows="4">{{$rsdb.shipment_conf_cne}}</textarea>
                    <br>
                    <a href="javascript:void(0)" onClick="getExpressConf('shipment_conf_cne','cne','CNE')"><font color="#003399">点击设置</font></a>
                </td>
            </tr>
            <tr>
                <td>UBI交运设置</td>
                <td>
                    <textarea name="webdbs[shipment_conf_ubi]" id="shipment_conf_ubi" readonly cols="8" rows="4">{{$rsdb.shipment_conf_ubi}}</textarea>
                    <br>
                    <a href="javascript:void(0)" onClick="getExpressConf('shipment_conf_ubi','ubi','UBI')"><font color="#003399">点击设置</font></a>
                </td>
            </tr>
            
            <tr>
                <td>燕文交运设置</td>
                <td>
                    <textarea name="webdbs[yanwenexpressset]" id="yanwenexpressset" readonly cols="8" rows="4">{{$rsdb.yanwenexpressset}}</textarea>
                    <br>
                    <a href="javascript:void(0)" onClick="getyanwenexpress(7)"><font color="#003399">点击设置</font></a>
                </td>
            </tr>
            <tr>
                <td>云途交运设置</td>
                <td>
                    <textarea name="webdbs[yuntuexpressset]" id="yuntuexpressset" readonly cols="8" rows="4">{{$rsdb.yuntuexpressset}}</textarea>
                    <br>
                    <a href="javascript:void(0)" onClick="getyuntuexpress(6)"><font color="#003399">点击设置</font></a>
                </td>
            </tr>
            <tr>
                <td>苏州E邮宝交运设置</td>
                <td>
                    <textarea name="webdbs[emsexpressset]" id="emsexpressset" readonly cols="8" rows="4">{{$rsdb.emsexpressset}}</textarea>
                    <br>
                    <a href="javascript:void(0)" onClick="getemsexpress(8)"><font color="#003399">点击设置</font></a>
                </td>
            </tr>
            <tr>
                <td>E邮宝线下上海交运设置</td>
                <td>
                    <textarea name="webdbs[eofflineexpressset]" id="eofflineexpressset" readonly cols="8" rows="4">{{$rsdb.eofflineexpressset}}</textarea>
                    <br>
                    <a href="javascript:void(0)" onClick="geteofflineexpress(8)"><font color="#003399">点击设置</font></a>
                </td>
            </tr>
            <tr>
                <td>ASPCNPOST交运设置(e邮宝线上）</td>
                <td>
                    <textarea name="webdbs[cnpostexpressset]" id="cnpostexpressset" readonly cols="8" rows="4">{{$rsdb.cnpostexpressset}}</textarea>
                    <br>
                    <a href="javascript:void(0)" onClick="getcnpostexpress(8);"><font color="#003399">点击设置</font></a>
                </td>
            </tr>
            
            <tr>
                <td>DHL使用远程交运</td>
                <td>
                   <input type="radio" name="webdbs[isdhlremote]" id="isdhlremote" value="1" {{if $rsdb.isdhlremote==1}} checked{{/if}} />
              是
              <input type="radio" name="webdbs[isdhlremote]" id="isdhlremote"  value="0" {{if $rsdb.isdhlremote==0}} checked{{/if}} />
              否<br>
              DHL交运服务器在中欧国家，国内交运经常访问不了，使用远程服务器（47.88.102.159,使用远程交运确保该VPS运行正常）完成交运，将运单号和面单取回本地
                </td>
            </tr>
            
             <tr>
                <td>二号仓仓位</td>
                <td>
                   <textarea name="webdbs[notwowarehousepositions]" id="notwowarehousepositions"  cols="8" rows="4">{{$rsdb.notwowarehousepositions}}
                   </textarea>
                 <br>采购单中如果有一个商品的仓库包含上述即自动默认发往2号仓

                </td>
            </tr>
        </tbody>
      </table>
      <br/>
      <button class="submit radius2">Submit Button</button>
    </div>
    <!--contentwrapper-->
  </form>
</div>


<!-- 模态框（Modal）交运设置 -->
<form  method="post" class="stdform stdform2" >
  <input type="hidden" name="editid" id="editid">
  <div class="modal fade" id="showgetexpress" tabindex="-1" role="dialog" aria-labelledby="sshowgetexpress" aria-hidden="true">
    <div class="modal-dialog" style="width:740px;">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" 
               aria-hidden="true">× </button>
          <h4 class="modal-title" id="sshowmabangorder"> USP交运设置 </h4>
        </div>
        <div class="modal-body">
          
        <div id="basicform" class="subcontent">

   
    <p><label>公司名称：</label> <span class="field">
<input  value="man chuang" id="comname" name="comname"  type="text"  class="dfinput" /></span></p>
    <p><label>寄件人姓名</label> <span class="field">
<input  value="zheng chao" id="attentionname" name="attentionname" type="text" class="dfinput" /></span></p>
    <p><label>寄件人帐号</label> <span class="field">
<input  value="WY3000" id="shippernumber" name="shippernumber" type="text" class="dfinput" /></span></p>
    <p><label>电话号码</label> <span class="field">
<input  value="13818476032"  id="phonenumber" name="phonenumber" type="text" class="dfinput" /></span></p>
    <p><label>地址</label> <span class="field">
<input value="Shanghai Jiading Huajiang Road No. 1028 Building No. 2 6 floor" id="address" name="address" type="text" class="dfinput" /></span></p>
    <p><label>城市名</label> <span class="field">
<input value="SHANGHAI" id="city" name="city" type="text" class="dfinput" /></span></p>
    <p><label>邮编</label> <span class="field">
<input   value="201803" id="postcode" name="postcode" type="text" class="dfinput" /></span></p>
    <p><label>国家二级代码</label> <span class="field">
<input  value="CN" id="countrycode" name="countrycode" type="text" class="dfinput" /></span></p>
    <p><label>密码</label ><span class="field">
<input  value="123456Aa" id="password" name="password" type="text" class="dfinput" /></span></p>
    <p><label>令牌</label> <span class="field">
<input  value="8D02441561564894" id="accesskey" name="accesskey" type="text" class="dfinput" /></span></p>
<p><label>第一次交运链接</label> <span class="field">
  <input value="https://wwwcie.ups.com/ups.app/xml/ShipConfirm" id="upsurl1" name="upsurl1" type="text" class="dfinput" /></span></p>
<p><label>第二次交运链接</label> <span class="field">
<input value="https://wwwcie.ups.com/ups.app/xml/ShipAccept" id="upsurl2" name="upsurl2" type="text" class="dfinput" /></span></p>
    </div>

         
          <div class="modal-footer">
            <button type="button" class="btn btn-default" 
               data-dismiss="modal"> 关闭 </button>
            <button type="button" class="btn btn-primary"  onclick="atmangban()"> 提交 </button>
          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
  </div>
  <!-- /.modal -->
</form>


    <!--dhl cne ubi交运设置 2017/6/13-->
<form  method="post" class="stdform stdform2" >
    <input type="hidden" name="editid" id="editid">
    <input type="hidden" name="shipment_type" id="shipment_type" value="0">
    <div class="modal fade" id="shipmentMemberSet" tabindex="-1" role="dialog" aria-labelledby="sshowgetexpress" aria-hidden="true">
        <div class="modal-dialog" style="width:740px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                            aria-hidden="true">× </button>
                    <h4 class="modal-title" id="sshowmabangorder">
                        <span id="shipment_titlename">dhl/cne/ubi交运设置</span>
                    </h4>
                </div>
                <div class="modal-body">
                    <div id="basicform" class="subcontent">
                        <p><label>客户帐号(ID)<span style="color:red;"></span></label> <span class="field">
<input  value="" id="shipment_userid" name="shipment_userid"  type="text"  class="dfinput" placeholder="账号id/key"/>
                            </span>
                        </p>
                        <p><label><span id="password" name="password">密码（密钥）:</span></label> <span class="field">
<input  value="" id="shipment_pass" name="shipment_pass" type="text" class="dfinput"  placeholder="帐号密码/token"/></span></p>
                        <!--
                        <p><label>货币符号</label> <span class="field">
<input  value="" id="yanwen_currency" name="yanwen_currency" type="text" class="dfinput" /><br/>多个以 "|"号隔开</span></p>
-->
                        <p><label>接口地址:</label> <span class="field">
<input value="" id="shipment_apiurl" name="shipment_apiurl" type="text" class="dfinput" placeholder="接口地址" /></span></p>
                        <!--
                        <p><label>发货方式</label> <span class="field">
<textarea name='yanwen_channel' id="yanwen_channel" cols="8" rows="4"></textarea><br/>多个以 "|"号隔开</span></p>
-->
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default"
                                data-dismiss="modal"> 关闭 </button>
                        <button type="button" class="btn btn-primary"  onclick="submitShipmentConf()"> 提交 </button>
                    </div>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal-dialog -->
        </div>
    </div>
    <!-- /.modal -->
</form>
    
    
    <!--燕文交运设置 2017/6/13-->
    <!-- 模态框（Modal）交运设置 -->
    <form  method="post" class="stdform stdform2" >
        <input type="hidden" name="editid" id="editid">
        <input type="hidden" name="orderType" id="orderType">
        <div class="modal fade" id="showgetyanwenexpress" tabindex="-1" role="dialog" aria-labelledby="sshowgetexpress" aria-hidden="true">
            <div class="modal-dialog" style="width:740px;">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"
                                aria-hidden="true">× </button>
                        <h4 class="modal-title" id="sshowmabangorder">
                            <span id="titlename">燕文交运设置</span>
                        </h4>
                    </div>
                    <div class="modal-body">
                        <div id="basicform" class="subcontent">
                            <p><label>客户号<span style="color:red;"></span></label> <span class="field">
<input  value="" id="yanwen_userid" name="yanwen_userid"  type="text"  class="dfinput" placeholder="测试账号为：100000"/>
                                </span>
                            </p>
                            <p><label><span id="password" name="password">密码:</span></label> <span class="field">
<input  value="" id="yanwen_pass" name="yanwen_pass" type="text" class="dfinput"  placeholder="测试密码为：12345678"/></span></p>
                            <!--
                            <p><label>货币符号</label> <span class="field">
<input  value="" id="yanwen_currency" name="yanwen_currency" type="text" class="dfinput" /><br/>多个以 "|"号隔开</span></p>
    -->
                            <p><label>接口服务地址:</label> <span class="field">
  <input value="" id="yanwen_apiurl" name="yanwen_apiurl" type="text" class="dfinput" placeholder="测试地址：http://online.yw56.com.cn:800/service_sandbox" /></span></p>
                            <!--
                            <p><label>发货方式</label> <span class="field">
<textarea name='yanwen_channel' id="yanwen_channel" cols="8" rows="4"></textarea><br/>多个以 "|"号隔开</span></p>
-->
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default"
                                    data-dismiss="modal"> 关闭 </button>
                            <button type="button" class="btn btn-primary"  onclick="yanwenatmangban()"> 提交 </button>
                        </div>
                    </div>
                    <!-- /.modal-content -->
                </div>
                <!-- /.modal-dialog -->
            </div>
        </div>
        <!-- /.modal -->
    </form>
    <!--  苏州E邮宝线下交运设置 模态框（Modal）交运设置 -->
    <form  method="post" class="stdform stdform2" >
        <input type="hidden" name="editid" id="editid">
        <div class="modal fade" id="showgetemsexpress" tabindex="-1" role="dialog" aria-labelledby="sshowgetemsexpress" aria-hidden="true">
            <div class="modal-dialog" style="width:740px;">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"
                                aria-hidden="true">× </button>
                        <h4 class="modal-title" id="sshowmabangorder"> 苏州E邮宝交运设置 </h4>
                    </div>
                    <div class="modal-body">
                        <div id="basicform" class="subcontent">
                            <p><label>账号别名：</label> <span class="field">
<input  value="" id="e_alias" name="e_alias"  type="text"  class="dfinput" /></span></p>
                            <p><label>账号类型：</label> <span class="field">
                             <select id="e_accounttype" name="e_accounttype">
                                 <option value="你自己的e邮宝账号">你自己的e邮宝账号</option>
                             </select>
                                </span></p>
                            <p><label>发件人姓名</label> <span class="field">
<input  value="" id="e_username" name="e_username" type="text" class="dfinput" /></span></p>
                            <p><label>邮编</label> <span class="field">
<input   value="" id="e_postcode" name="e_postcode" type="text" class="dfinput" /></span></p>
                            <p><label>电话</label> <span class="field">
<input  value=""  id="e_phone" name="e_phone" type="text" class="dfinput" /></span></p>
                            <p><label>手机</label> <span class="field">
<input  value="" id="e_mobile" name="e_mobile" type="text" class="dfinput" /></span></p>
                            <p><label>公司名称：</label> <span class="field">
<input  value="" id="e_company" name="e_company"  type="text"  class="dfinput" /></span></p>
                            <p><label>街道地址</label> <span class="field">
<input value="" id="e_address" name="e_address" type="text" class="dfinput" /></span></p>
                            <p><label>EMail</label> <span class="field">
<input   value="" id="e_email" name="e_email" type="text" class="dfinput" /></span></p>
                            <p><label>国家</label> <span class="field">
                             <select id="e_country" name="e_country">
                                 <option value="CN">中国</option>
                             </select>
                            <p><label>省名</label> <span class="field">
                             <select id="e_province" name="e_province">
                                 <option value="320000">江苏</option>
                             </select>
                            <p><label>城市名</label> <span class="field">
                             <select id="e_city" name="e_city">
                                 <option value="320500">苏州</option>
                             </select>
                            <p><label>地区</label> <span class="field">
                             <select id="e_area" name="e_area">
                                 <option value="320594">新区</option>
                             </select>
                            <p><label>国家二级代码</label> <span class="field">
<input  value="CN" id="e_countrycode" name="e_countrycode" type="text" class="dfinput" /></span></p>
                            <p><label>版本号</label ><span class="field">
<input  value="international_eub_us_1.1" id="e_version" name="e_version" type="text" class="dfinput" placeholder="测试版本号：international_eub_us_1.1"/></span></p>
                            <p><label>授权码</label> <span class="field">
<input  value="shsn3_3c87fa945b8c3c81918c9fba36819dd0" id="e_token" name="e_token" type="text" class="dfinput" placeholder="测试授权码：shsn3_3c87fa945b8c3c81918c9fba36819dd0"/></span></p>
                            <p><label>交运链接地址</label> <span class="field">
  <input value="http://shipping.ems.com.cn/partner/api/public/p/order/" id="e_url" name="e_url" type="text" class="dfinput" placeholder="测试 http://shipping.ems.com.cn/partner/api/public/p/order/"/></span></p>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default"
                                    data-dismiss="modal"> 关闭 </button>
                            <button type="button" class="btn btn-primary"  onclick="emsatmangban()"> 提交 </button>
                        </div>
                    </div>
                    <!-- /.modal-content -->
                </div>
                <!-- /.modal-dialog -->
            </div>
        </div>
        <!-- /.modal -->
    </form>
    <!--  E邮宝线下交运设置 模态框（Modal）交运设置 -->
    <form  method="post" class="stdform stdform2" >
        <input type="hidden" name="editid" id="editid">
        <div class="modal fade" id="showgeteofflineexpress" tabindex="-1" role="dialog" aria-labelledby="sshowgeteofflineexpress" aria-hidden="true">
            <div class="modal-dialog" style="width:740px;">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"
                                aria-hidden="true">× </button>
                        <h4 class="modal-title" id="sshowmabangorder"> E邮宝线下上海交运设置 </h4>
                    </div>
                    <div class="modal-body">
                        <div id="basicform" class="subcontent">
                            <p><label>账号别名：</label> <span class="field">
<input  value="" id="eoffline_alias" name="eoffline_alias"  type="text"  class="dfinput" /></span></p>
                            <p><label>账号类型：</label> <span class="field">
                             <select id="eoffline_accounttype" name="eoffline_accounttype">
                                 <option value="你自己的e邮宝账号">你自己的e邮宝账号</option>
                             </select>
                                </span></p>
                            <p><label>发件人姓名</label> <span class="field">
<input  value="" id="eoffline_username" name="eoffline_username" type="text" class="dfinput" /></span></p>
                            <p><label>邮编</label> <span class="field">
<input   value="" id="eoffline_postcode" name="eoffline_postcode" type="text" class="dfinput" /></span></p>
                            <p><label>电话</label> <span class="field">
<input  value=""  id="eoffline_phone" name="eoffline_phone" type="text" class="dfinput" /></span></p>
                            <p><label>手机</label> <span class="field">
<input  value="" id="eoffline_mobile" name="eoffline_mobile" type="text" class="dfinput" /></span></p>
                            <p><label>公司名称：</label> <span class="field">
<input  value="" id="eoffline_company" name="eoffline_company"  type="text"  class="dfinput" /></span></p>
                            <p><label>街道地址</label> <span class="field">
<input value="" id="eoffline_address" name="eoffline_address" type="text" class="dfinput" /></span></p>
                            <p><label>EMail</label> <span class="field">
<input   value="" id="eoffline_email" name="eoffline_email" type="text" class="dfinput" /></span></p>
                            <p><label>国家</label> <span class="field">
                             <select id="eoffline_country" name="eoffline_country">
                                 <option value="CN">中国</option>
                             </select>
                            <p><label>省名</label> <span class="field">
                             <select id="eoffline_province" name="eoffline_province">
                                 <option value="310000">上海</option>
                             </select>
                            <p><label>城市名</label> <span class="field">
                             <select id="eoffline_city" name="eoffline_city">
                                 <option value="310100">上海</option>
                             </select>
                            <p><label>地区</label> <span class="field">
                             <select id="eoffline_area" name="eoffline_area">
                                 <option value="310114">嘉定区</option>
                             </select>
                            <p><label>国家二级代码</label> <span class="field">
<input  value="CN" id="eoffline_countrycode" name="eoffline_countrycode" type="text" class="dfinput" /></span></p>
                            <p><label>版本号</label ><span class="field">
<input  value="international_eub_us_1.1" id="eoffline_version" name="eoffline_version" type="text" class="dfinput" placeholder="测试版本号：international_eub_us_1.1"/></span></p>
                            <p><label>授权码</label> <span class="field">
<input  value="shsn3_3c87fa945b8c3c81918c9fba36819dd0" id="eoffline_token" name="eoffline_token" type="text" class="dfinput" placeholder="测试授权码：shsn3_3c87fa945b8c3c81918c9fba36819dd0"/></span></p>
                            <p><label>交运链接地址</label> <span class="field">
  <input value="http://shipping.ems.com.cn/partner/api/public/p/order/" id="eoffline_url" name="eoffline_url" type="text" class="dfinput" placeholder="测试 http://shipping.ems.com.cn/partner/api/public/p/order/"/></span></p>
  
  
   
  
  
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default"
                                    data-dismiss="modal"> 关闭 </button>
                            <button type="button" class="btn btn-primary"  onclick="eofflineatmangban()"> 提交 </button>
                        </div>
                    </div>
                    <!-- /.modal-content -->
                </div>
                <!-- /.modal-dialog -->
            </div>
        </div>
        <!-- /.modal -->
    </form>
    <!--  E邮宝ASPCNPOST交运设置 模态框（Modal）交运设置 -->
    <form  method="post" class="stdform stdform2" >
        <input type="hidden" name="editid" id="editid">
        <div class="modal fade" id="showgetcnpostexpress" tabindex="-1" role="dialog" aria-labelledby="sshowgetcnpostexpress" aria-hidden="true">
            <div class="modal-dialog" style="width:740px;">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"
                                aria-hidden="true">× </button>
                        <h4 class="modal-title" id="sshowmabangorder">ASPCNPOST物流账号配置</h4>
                    </div>
                    <div class="modal-body">
                        <div id="basicform" class="subcontent">
                            <p><label>账号别名：</label> <span class="field">
<input  value="" id="cnpost_alias" name="cnpost_alias"  type="text"  class="dfinput" /></span></p>
                            <p><label>发件人姓名</label> <span class="field">
<input  value="" id="cnpost_username" name="cnpost_username" type="text" class="dfinput" /></span></p>
                            <p><label>电话</label> <span class="field">
<input  value=""  id="cnpost_phone" name="cnpost_phone" type="text" class="dfinput" /></span></p>
                            <p><label>邮编</label> <span class="field">
<input   value="" id="cnpost_postcode" name="cnpost_postcode" type="text" class="dfinput" /></span></p>
                            <p><label>英文地址</label> <span class="field">
<input value="" id="cnpost_enaddress" name="cnpost_enaddress" type="text" class="dfinput" /></span></p>
                            <p><label>中文地址</label> <span class="field">
<input value="" id="cnpost_cnaddress" name="cnpost_cnaddress" type="text" class="dfinput" /></span></p>
                            <p><label>国家编码</label> <span class="field">
<input  value="CN" id="cnpost_countrycode" name="cnpost_countrycode" type="text" class="dfinput" /></span></p>
                            <p><label>省份编码(如上海填:310000)</label> <span class="field">
<input value="" id="cnpost_province" name="cnpost_province" type="text" class="dfinput" /></span></p>
                            <p><label>城市编码(如上海市填310100)</label> <span class="field">
<input value="" id="cnpost_city" name="cnpost_city" type="text" class="dfinput" /></span></p>
                            <p><label>地区编码(如闵行区填310112)</label> <span class="field">
<input value="" id="cnpost_area" name="cnpost_area" type="text" class="dfinput" /></span></p>
                            <p><label>发件人email</label> <span class="field">
<input   value="" id="cnpost_email" name="cnpost_email" type="text" class="dfinput" /></span></p>
                            <p><label>公司传真</label> <span class="field">
<input   value="" id="cnpost_fax" name="cnpost_fax" type="text" class="dfinput" /></span></p>
                            <p><label>版本号</label ><span class="field">
<input  value="international_eub_us_1.1" id="cnpost_version" name="cnpost_version" type="text" class="dfinput" placeholder="测试版本号：international_eub_us_1.1"/></span></p>
                            <p><label>授权码</label> <span class="field">
<input  value="shsn3_3c87fa945b8c3c81918c9fba36819dd0" id="cnpost_token" name="cnpost_token" type="text" class="dfinput" placeholder="测试授权码：shsn3_3c87fa945b8c3c81918c9fba36819dd0"/></span></p>
                            <p><label>交运链接地址</label> <span class="field">
  <input value="http://shipping.ems.com.cn/partner/api/public/p/order/" id="cnpost_url" name="cnpost_url" type="text" class="dfinput" placeholder="测试 http://shipping.ems.com.cn/partner/api/public/p/order/"/></span></p>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default"
                                    data-dismiss="modal"> 关闭 </button>
                            <button type="button" class="btn btn-primary"  onclick="cnpostatmangban()"> 提交 </button>
                        </div>
                    </div>
                    <!-- /.modal-content -->
                </div>
                <!-- /.modal-dialog -->
            </div>
        </div>
        <!-- /.modal -->
    </form>
    <!--  云途交运设置 模态框（Modal）交运设置 -->
    <form  method="post" class="stdform stdform2" >
        <input type="hidden" name="editid" id="editid">
        <div class="modal fade" id="showgetyuntuexpress" tabindex="-1" role="dialog" aria-labelledby="sshowgetyuntuexpress" aria-hidden="true">
            <div class="modal-dialog" style="width:740px;">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"
                                aria-hidden="true">× </button>
                        <h4 class="modal-title" id="sshowmabangorder"> 云途交运设置 </h4>
                    </div>
                    <div class="modal-body">
                        <div id="basicform" class="subcontent">
                            <p><label>公司名称：</label> <span class="field">
<input  value="" id="y_company" name="y_company"  type="text"  class="dfinput" /></span></p>
                            <p><label>发件人姓</label> <span class="field">
<input  value="" id="y_xing" name="y_xing" type="text" class="dfinput" /></span></p>
                            <p><label>发件人名字</label> <span class="field">
<input   value="" id="y_name" name="y_name" type="text" class="dfinput" /></span></p>
                            <p><label>手机号码</label> <span class="field">
<input  value="" id="y_mobile" name="y_mobile" type="text" class="dfinput" /></span></p>
                            <p><label>电话号码</label> <span class="field">
<input  value=""  id="y_phone" name="y_phone" type="text" class="dfinput" /></span></p>
                            <p><label>地址</label> <span class="field">
<input value="" id="y_address" name="y_address" type="text" class="dfinput" /></span></p>
                            <p><label>省名</label> <span class="field">
<input value="" id="y_province" name="y_province" type="text" class="dfinput" /></span></p>
                            <p><label>城市名</label> <span class="field">
<input value="" id="y_city" name="y_city" type="text" class="dfinput" /></span></p>
                            <p><label>邮编</label> <span class="field">
<input   value="" id="y_postcode" name="y_postcode" type="text" class="dfinput" /></span></p>
                            <p><label>国家二级代码</label> <span class="field">
<input  value="CN" id="y_countrycode" name="y_countrycode" type="text" class="dfinput" /></span></p>
                            <p><label>客户编号</label ><span class="field">
<input  value="C88888" id="y_version" name="y_version" type="text" class="dfinput" placeholder="测试：C88888"/></span></p>
                            <p><label>ApiSecret</label> <span class="field">
<input  value="JCJaDQ68amA=" id="y_token" name="y_token" type="text" class="dfinput" placeholder="测试：JCJaDQ68amA="/></span></p>
                            <p><label>交运链接地址</label> <span class="field">
  <input value="http://121.201.67.89:8034/LMS.API/api/" id="y_url" name="y_url" type="text" class="dfinput" placeholder="测试：http://121.201.67.89:8034/LMS.API/api/" /></span></p>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default"
                                    data-dismiss="modal"> 关闭 </button>
                            <button type="button" class="btn btn-primary"  onclick="yuntuatmangban()"> 提交 </button>
                        </div>
                    </div>
                    <!-- /.modal-content -->
                </div>
                <!-- /.modal-dialog -->
            </div>
        </div>
        <!-- /.modal -->
    </form>
<script>
    //cnpost
    function getcnpostexpress(orderType){
        $.post("/deliverorder/ajaxbutton", {"op": "getyanwenexpress","ckey":"cnpostexpressset"},
                function(data){
                    if(data){
                        $("#cnpost_alias").val(data.cnpost_alias);
                        $("#cnpost_username").val(data.cnpost_username);
                        $("#cnpost_phone").val(data.cnpost_phone);
                        $("#cnpost_fax").val(data.cnpost_fax);
                        $("#cnpost_enaddress").val(data.cnpost_enaddress);
                        $("#cnpost_cnaddress").val(data.cnpost_cnaddress);
                        $("#cnpost_city").val(data.cnpost_city);
                        $("#cnpost_postcode").val(data.cnpost_postcode);
                        $("#cnpost_countrycode").val(data.cnpost_countrycode);
                        $("#cnpost_version").val(data.cnpost_version);
                        $("#cnpost_token").val(data.cnpost_token);
                        $("#cnpost_email").val(data.cnpost_email);
                        $("#cnpost_url").val(data.cnpost_url);
                        $("#cnpost_province").val(data.cnpost_province);
                        $("#cnpost_area").val(data.cnpost_area);
                        $('#showgetcnpostexpress').modal('show');

                    }
                },"json");
        $('#showgetcnpostexpress').modal('show');
    }
    function cnpostatmangban()
    {
        var cnpost_alias = $("#cnpost_alias").val();
        if(cnpost_alias=="")
        {
            alert("请输入别名！");
            return;
        }
        var cnpost_username = $("#cnpost_username").val();
        var cnpost_fax = $("#cnpost_fax").val();
        var cnpost_phone = $("#cnpost_phone").val();
        var cnpost_enaddress = $("#cnpost_enaddress").val();
        var cnpost_cnaddress = $("#cnpost_cnaddress").val();
        var cnpost_province = $("#cnpost_province").val();
        var cnpost_city = $("#cnpost_city").val();
        var cnpost_area = $("#cnpost_area").val();
        var cnpost_postcode = $("#cnpost_postcode").val();
        var cnpost_countrycode = $("#cnpost_countrycode").val();
        var cnpost_email = $("#cnpost_email").val();
        var cnpost_version = $("#cnpost_version").val();
        var cnpost_token = $("#cnpost_token").val();
        var cnpost_url = $("#cnpost_url").val();
        $.post("/deliverorder/ajaxbutton", {"op": "savecnpostexpress","cnpost_alias":cnpost_alias,"cnpost_fax":cnpost_fax,"cnpost_username":cnpost_username,"cnpost_phone":cnpost_phone,"cnpost_enaddress":cnpost_enaddress,"cnpost_cnaddress":cnpost_cnaddress,"cnpost_city":cnpost_city,"cnpost_postcode":cnpost_postcode,"cnpost_countrycode":cnpost_countrycode,"cnpost_province":cnpost_province,"cnpost_token":cnpost_token,"cnpost_url":cnpost_url,"cnpost_version":cnpost_version,"cnpost_area":cnpost_area,"cnpost_email":cnpost_email},
                function(data){
                    if(data)
                    {
                        $("#cnpostexpressset").val('');
                        $("#cnpostexpressset").val(data);
                        $('#showgetcnpostexpress').modal('hide');
                    }
                },"text");
    }
    //云途交运设置
    function getyuntuexpress(orderType){
        $.post("/deliverorder/ajaxbutton", {"op": "getyanwenexpress","ckey":"yuntuexpressset"},
                function(data){
                    if(data){
                        $("#y_company").val(data.y_company);
                        $("#y_xing").val(data.y_xing);
                        $("#y_name").val(data.y_name);
                        $("#y_phone").val(data.y_phone);
                        $("#y_mobile").val(data.y_mobile);
                        $("#y_address").val(data.y_address);
                        $("#y_city").val(data.y_city);
                        $("#y_postcode").val(data.y_postcode);
                        $("#y_countrycode").val(data.y_countrycode);
                        $("#y_version").val(data.y_version);
                        $("#y_token").val(data.y_token);
                        $("#y_url").val(data.y_url);
                        $("#y_province").val(data.y_province);
                        $('#showgetyuntuexpress').modal('show');

                    }
                },"json");
        $('#showgetyuntuexpress').modal('show');
    }
    function yuntuatmangban()
    {
        var y_company = $("#y_company").val();
        if(y_company=="")
        {
            alert("请输入公司名称！");
            return;
        }
        var y_xing = $("#y_xing").val();
        var y_mobile = $("#y_mobile").val();
        var y_phone = $("#y_phone").val();
        var y_address = $("#y_address").val();
        var y_province = $("#y_province").val();
        var y_city = $("#y_city").val();
        var y_postcode = $("#y_postcode").val();
        var y_countrycode = $("#y_countrycode").val();
        var y_name = $("#y_name").val();
        var y_version = $("#y_version").val();
        var y_token = $("#y_token").val();
        var y_url = $("#y_url").val();
        $.post("/deliverorder/ajaxbutton", {"op": "saveyuntuexpress","y_company":y_company,"y_xing":y_xing,"y_phone":y_phone,"y_mobile":y_mobile,"y_address":y_address,"y_city":y_city,"y_postcode":y_postcode,"y_countrycode":y_countrycode,"y_province":y_province,"y_token":y_token,"y_url":y_url,"y_version":y_version,"y_name":y_name},
                function(data){
                    if(data)
                    {
                        $("#yuntuexpressset").val('');
                        $("#yuntuexpressset").val(data);
                        $('#showgetyuntuexpress').modal('hide');
                    }
                },"text");
    }
    //燕文交运设置
    function getyanwenexpress(orderType)
    {
        //$("#orderType").val(orderType); //设置交运类型
        $.post("/deliverorder/ajaxbutton", {"op": "getyanwenexpress","ckey":"yanwenexpressset"},
                function(data){
                    if(data){
                        $("#yanwen_userid").val(data.yanwen_userid);
                        $("#yanwen_pass").val(data.yanwen_pass);
                        //$("#yanwen_channel").val(data.yanwen_channel);
                        $("#yanwen_apiurl").val(data.yanwen_apiurl);
                        //$("#yanwen_currency").val(data.yanwen_currency);
//                    if(data.orderType==6){
//                        $("#titlename").html("云途交运设置");
//                        $("#password").html("apiSecret");
//                    }else{
//                        $("#titlename").html("燕文交运设置");
//                        $("#password").html("密码");
//                    }
                        $('#showgetyanwenexpress').modal('show');
                    }
                },"json");
        $('#showgetyanwenexpress').modal('show');
    }
    function yanwenatmangban()
    {
        var yanwen_userid = $("#yanwen_userid").val();
        if(yanwen_userid=="")
        {
            alert("请输入客户号！");
            return;
        }
        var yanwen_pass = $("#yanwen_pass").val();
        //var yanwen_channel = $("#yanwen_channel").val();
        var yanwen_apiurl = $("#yanwen_apiurl").val();
        //var yanwen_currency = $("#yanwen_currency").val();
        //var orderType = $("#orderType").val();
        $.post("/deliverorder/ajaxbutton", {"op": "saveyanwenexpress","yanwen_userid":yanwen_userid,"yanwen_pass":yanwen_pass,"yanwen_apiurl":yanwen_apiurl},
                function(data){
                    if(data)
                    {
                        //if(data.orderType==6){ //为云途
                        //   $("#yuntuexpressset").val('');
                        //    $("#yuntuexpressset").val(data.searialize);
                        //     $('#showgeyanwentexpress').modal('hide');
                        // }else{  //7 为燕文
                        $("#yanwenexpressset").val('');
                        $("#yanwenexpressset").val(data.searialize);
                        $('#showgetyanwenexpress').modal('hide');
                        // }

                    }
                },"json");
    }
    //e邮宝交运设置
    function getemsexpress(orderType){
        $.post("/deliverorder/ajaxbutton", {"op": "getyanwenexpress","ckey":"emsexpressset"},
                function(data){
                    if(data){
                        $("#e_company").val(data.e_company);
                        $("#e_alias").val(data.e_alias);
                        $("#e_username").val(data.e_username);
                        $("#e_phone").val(data.e_phone)
                        $("#e_mobile").val(data.e_mobile);
                        $("#e_address").val(data.e_address);
                        $("#e_country").val(data.e_country);
                        $("#e_city").val(data.e_city);
                        $("#e_postcode").val(data.e_postcode);
                        $("#e_countrycode").val(data.e_countrycode);
                        $("#e_version").val(data.e_version);
                        $("#e_token").val(data.e_token);
                        $("#e_email").val(data.e_email);
                        $("#e_url").val(data.e_url);
                        $("#e_province").val(data.e_province);
                        $("#e_area").val(data.e_area);
                        $("#e_accounttype").val(data.e_accounttype);
                        $('#showgetemsexpress').modal('show');

                    }
                },"json");
        $('#showgetemsexpress').modal('show');
    }
    function emsatmangban()
    {
        var e_alias = $("#e_alias").val(); //账号别名
        if(e_alias=="")
        {
            alert("请输入别名！");
            return;
        }
        var e_company = $("#e_company").val();
        var e_username = $("#e_username").val();
        var e_phone = $("#e_phone").val();
        var e_mobile = $("#e_mobile").val();
        var e_address = $("#e_address").val();
        var e_country = $("#e_country").val();
        var e_province = $("#e_province").val();
        var e_city = $("#e_city").val();
        var e_area = $("#e_area").val();
        var e_postcode = $("#e_postcode").val();
        var e_countrycode = $("#e_countrycode").val();
        var e_email = $("#e_email").val();
        var e_version = $("#e_version").val();
        var e_token = $("#e_token").val();
        var e_url = $("#e_url").val();
        var e_accounttype = $("#e_accounttype").val();
        $.post("/deliverorder/ajaxbutton", {"op": "saveemsexpress","e_alias":e_alias,"e_accounttype":e_accounttype,"e_username":e_username,"e_phone":e_phone,"e_mobile":e_mobile,"e_address":e_address,"e_company":e_company,"e_city":e_city,"e_country":e_country,"e_postcode":e_postcode,"e_countrycode":e_countrycode,"e_province":e_province,"e_token":e_token,"e_url":e_url,"e_version":e_version,"e_area":e_area,"e_email":e_email},
                function(data){
                    if(data)
                    {
                        $("#emsexpressset").val('');
                        $("#emsexpressset").val(data);
                        $('#showgetemsexpress').modal('hide');
                    }
                },"text");
    }
    //e邮宝交运设置
    function geteofflineexpress(orderType){
        $.post("/deliverorder/ajaxbutton", {"op": "getyanwenexpress","ckey":"eofflineexpressset"},
                function(data){
                    if(data){
                        $("#eoffline_company").val(data.eoffline_company);
                        $("#eoffline_alias").val(data.eoffline_alias);
                        $("#eoffline_username").val(data.eoffline_username);
                        $("#eoffline_phone").val(data.eoffline_phone)
                        $("#eoffline_mobile").val(data.eoffline_mobile);
                        $("#eoffline_address").val(data.eoffline_address);
                        $("#eoffline_country").val(data.eoffline_country);
                        $("#eoffline_city").val(data.eoffline_city);
                        $("#eoffline_postcode").val(data.eoffline_postcode);
                        $("#eoffline_countrycode").val(data.eoffline_countrycode);
                        $("#eoffline_version").val(data.eoffline_version);
                        $("#eoffline_token").val(data.eoffline_token);
                        $("#eoffline_email").val(data.eoffline_email);
                        $("#eoffline_url").val(data.eoffline_url);
                        $("#eoffline_province").val(data.eoffline_province);
                        $("#eoffline_area").val(data.eoffline_area);
                        $("#eoffline_accounttype").val(data.eoffline_accounttype);
                        $('#showgeteofflineexpress').modal('show');

                    }
                },"json");
        $('#showgeteofflineexpress').modal('show');
    }
    function eofflineatmangban()
    {
        var eoffline_alias = $("#eoffline_alias").val(); //账号别名
        if(eoffline_alias=="")
        {
            alert("请输入别名！");
            return;
        }
        var eoffline_company = $("#eoffline_company").val();
        var eoffline_username = $("#eoffline_username").val();
        var eoffline_phone = $("#eoffline_phone").val();
        var eoffline_mobile = $("#eoffline_mobile").val();
        var eoffline_address = $("#eoffline_address").val();
        var eoffline_country = $("#eoffline_country").val();
        var eoffline_province = $("#eoffline_province").val();
        var eoffline_city = $("#eoffline_city").val();
        var eoffline_area = $("#eoffline_area").val();
        var eoffline_postcode = $("#eoffline_postcode").val();
        var eoffline_countrycode = $("#eoffline_countrycode").val();
        var eoffline_email = $("#eoffline_email").val();
        var eoffline_version = $("#eoffline_version").val();
        var eoffline_token = $("#eoffline_token").val();
        var eoffline_url = $("#eoffline_url").val();
        var eoffline_accounttype = $("#eoffline_accounttype").val();
        $.post("/deliverorder/ajaxbutton", {"op": "saveeofflineexpress","eoffline_alias":eoffline_alias,"eoffline_accounttype":eoffline_accounttype,"eoffline_username":eoffline_username,"eoffline_phone":eoffline_phone,"eoffline_mobile":eoffline_mobile,"eoffline_address":eoffline_address,"eoffline_company":eoffline_company,"eoffline_city":eoffline_city,"eoffline_country":eoffline_country,"eoffline_postcode":eoffline_postcode,"eoffline_countrycode":eoffline_countrycode,"eoffline_province":eoffline_province,"eoffline_token":eoffline_token,"eoffline_url":eoffline_url,"eoffline_version":eoffline_version,"eoffline_area":eoffline_area,"eoffline_email":eoffline_email},
                function(data){
                    if(data)
                    {
                        $("#eofflineexpressset").val('');
                        $("#eofflineexpressset").val(data);
                        $('#showgeteofflineexpress').modal('hide');
                    }
                },"text");
    }

</script>
</body>
</html>